using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace Randomize.Core.Descriptors
{
    public interface IComplexTypeDescriptor<TComplex> : IGenerationDescriptor<TComplex>
    {
        IIntDescriptor Property(Expression<Func<TComplex, int>> property, Action<TComplex, int> setter = null);

        IDoubleDescriptor Property(Expression<Func<TComplex, double>> property, Action<TComplex, double> setter = null);

        IStringDescriptor Property(Expression<Func<TComplex, string>> property, Action<TComplex, string> setter = null);

        IDateTimeDescriptor Property(Expression<Func<TComplex, DateTime>> property, Action<TComplex, DateTime> setter = null);

        ICollectionDescriptor<TCollectionItem> Collection<TCollectionItem>(
            IGenerationDescriptor<TCollectionItem> itemDescriptor, Action<TComplex, IEnumerable<TCollectionItem>> setter);

        void CreateUsing(Func<TComplex> constructingFunction);
    }
}